package com.allianz.webapps.controllers;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.allianz.webapps.https.interfaces.type001.pojo.User;
import com.allianz.webapps.https.interfaces.util.ObjectUtil;
import com.fasterxml.jackson.databind.ObjectMapper;

@Controller
@RequestMapping(value="main")
public class AppGetCPListController {

	@Autowired
	private ObjectMapper objectMapper;
	@Autowired
	private ObjectUtil objectUtil;
	
	/**
	 * 帅选接口，获取所以CP对象
	 */
	@RequestMapping(value="appGetCPList")
	@ResponseBody
	public String appGetCPList(HttpServletRequest request,HttpServletResponse response)
			throws Exception{
		User user=(User)request.getSession().getAttribute("username");
		String body=objectUtil.requestParam(user, "app.getCpList");
		return body;
	}
	
}
